<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
	<meta charset="UTF-8">
	<link rel="stylesheet" href="css/iconfont.css">
	<link rel="stylesheet" href="css/global.css">
	<link rel="stylesheet" href="css/bootstrap.min.css">
	<link rel="stylesheet" href="css/bootstrap-theme.min.css">
	<link rel="stylesheet" href="css/swiper.min.css">
	<link rel="stylesheet" href="css/styles.css">
	<link rel="stylesheet" href="css/logo.css" />
	<link rel="stylesheet"  type="text/css" href="css/sandian/iconfont.css">
	<script src="js/jquery.1.12.4.min.js" charset="UTF-8"></script>
	<script src="js/bootstrap.min.js" charset="UTF-8"></script>
	<script src="js/swiper.min.js" charset="UTF-8"></script>
	<script src="js/global.js" charset="UTF-8"></script>
	<!-- <script src="js/jquery.DJMask.2.1.1.js" charset="UTF-8"></script> -->
	<title>领劵中心</title>
</head>
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
<body>
	<!-- 顶部tab -->
	<div class="tab-header">
		<div class="inner">
			<div class="pull-left">
				<div class="pull-left">嗨，欢迎来到<span class="cr">XXX</span></div>
				<a href="agent_level.html">网店代销</a>
				<a href="temp_article/udai_article4.html">帮助中心</a>
			</div>
			<div class="pull-right">
				<a href="login.html"><span class="cr">登录</span></a>
				<a href="login.html?p=register">注册</a>
				<a href="udai_welcome.html">我的U袋</a>
				<a href="udai_order.html">我的订单</a>
				<a href="udai_integral.html">积分平台</a>
			</div>
		</div>
	</div>
	<div id="body1"></div>
	<!-- <div id="djs2"></div> -->
	<!-- 搜索栏 -->
	<a class="logo" href="index.html"><li id="logo"></li></a>
	<!-- <div class="bgf5 clearfix">
			<div class="top-user">
				<div class="inner">
					<a class="logo" href="index.html"><li id="logo"><></a>
					<div class="title">个人中心</div>
				</div>
			</div>
		</div> -->
		
	<div class="top-search">
		<div class="inner">
			<!-- <a class="logo" href="index.html"></a> -->
			<div class="search-box">
				<form class="input-group">
					<input placeholder="Ta们都在搜XXX" type="text">
					<span class="input-group-btn">
						<button type="button">
							<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
						</button>
					</span>
				</form>
				<p class="help-block text-nowrap">
					<a href="">连衣裙</a>
					<a href="">裤</a>
					<a href="">衬衫</a>
					<a href="">T恤</a>
					<a href="">女包</a>
					<a href="">家居服</a>
					<a href="">2017新款</a>
				</p>
			</div>
			<div class="cart-box">
				<a href="udai_shopcart.html" class="cart-but">
					<i class="iconfont icon-shopcart cr fz16"></i> 购物车 0 件
				</a>
			</div>
		</div>
	</div>
	<!-- 内页导航栏 -->
	<div class="top-nav bg3">
		<div class="nav-box inner">
			<div class="all-cat">
				<div class="title"><i class="iconfont icon-menu"></i> 全部分类</div>
			</div>
			<ul class="nva-list">
				<a href="index.html"><li>首页</li></a>
				<a href="miaosha.html"><li class="active">秒杀</li></a>
				<a href="temp_article/udai_article10.html"><li>企业简介</li></a>
				<a href="temp_article/udai_article5.html"><li>新手上路</li></a>
				<a href="class_room.html"><li>U袋学堂</li></a>
				<a href="enterprise_id.html"><li>企业账号</li></a>
				<a href="udai_contract.html"><li>诚信合约</li></a>
				<a href="item_remove.html"><li>实时下架</li></a>
			</ul>
		</div>
	</div>
	<div class="content inner">
		<section class="panel__div clearfix">
			<!-- <div class="filter-value" id="body"></div> -->
			<div class="filter-value">
				<div class="huanyanse" id="yidaojishi" onclick="shuaxin()"></div>
				
				<div id="body2"></div>
				
			</div>
			
			<div class="html-code">
				<div class="content inner" style="margin-bottom: 40px;">
					
					<section class="scroll-floor floor-3">
						<div class="floor-title">
							<i class="iconfont icon-shandian fz20"></i> 领劵中心
							<!-- <div class="case-list fz0 pull-right">
								<a>饮食</a>
								<a>服饰</a>
								<a>数码</a>
								<a>手机</a>
								<a>家具</a>
								<a>电器</a>
							</div> -->
						</div>
						<div id="xp">
							
						</div>
						<div class="con-box">
						</div>
					</section>
				
				</div>
			</div>
		</section>
	</div>
	<!-- 右侧菜单 -->
	<div class="right-nav">
		<ul class="r-with-gotop">
			<li class="r-toolbar-item">
				<a href="udai_welcome.html" class="r-item-hd">
					<i class="iconfont icon-user" data-badge="0"></i>
					<div class="r-tip__box"><span class="r-tip-text">用户中心</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="udai_shopcart.html" class="r-item-hd">
					<i class="iconfont icon-cart"></i>
					<div class="r-tip__box"><span class="r-tip-text">购物车</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="udai_collection.html" class="r-item-hd">
					<i class="iconfont icon-aixin"></i>
					<div class="r-tip__box"><span class="r-tip-text">我的收藏</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="" class="r-item-hd">
					<i class="iconfont icon-liaotian"></i>
					<div class="r-tip__box"><span class="r-tip-text">联系客服</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="issues.html" class="r-item-hd">
					<i class="iconfont icon-liuyan"></i>
					<div class="r-tip__box"><span class="r-tip-text">留言反馈</span></div>
				</a>
			</li>
			<li class="r-toolbar-item to-top">
				<i class="iconfont icon-top"></i>
				<div class="r-tip__box"><span class="r-tip-text">返回顶部</span></div>
			</li>
		</ul>
		
	</div>
	<!-- 底部信息 -->
	<div class="footer">
		<div class="footer-tags">
			<div class="tags-box inner">
				<div class="tag-div">
					<img src="images/icons/footer_1.gif" alt="厂家直供">
				</div>
				<div class="tag-div">
					<img src="images/icons/footer_2.gif" alt="一件代发">
				</div>
				<div class="tag-div">
					<img src="images/icons/footer_3.gif" alt="美工活动支持">
				</div>
				<div class="tag-div">
					<img src="images/icons/footer_4.gif" alt="信誉认证">
				</div>
			</div>
		</div>
		<div class="footer-links inner">
			<dl>
				<dt>XXX</dt>
				<a href="temp_article/udai_article10.html"><dd>企业简介</dd></a>
				<a href="temp_article/udai_article11.html"><dd>加入U袋</dd></a>
				<a href="temp_article/udai_article12.html"><dd>隐私说明</dd></a>
			</dl>
			<dl>
				<dt>服务中心</dt>
				<a href="temp_article/udai_article1.html"><dd>售后服务</dd></a>
				<a href="temp_article/udai_article2.html"><dd>配送服务</dd></a>
				<a href="temp_article/udai_article3.html"><dd>用户协议</dd></a>
				<a href="temp_article/udai_article4.html"><dd>常见问题</dd></a>
			</dl>
			<dl>
				<dt>新手上路</dt>
				<a href="temp_article/udai_article5.html"><dd>如何成为代理商</dd></a>
				<a href="temp_article/udai_article6.html"><dd>代销商上架教程</dd></a>
				<a href="temp_article/udai_article7.html"><dd>分销商常见问题</dd></a>
				<a href="temp_article/udai_article8.html"><dd>付款账户</dd></a>
			</dl>
		</div>
		<div class="copy-box clearfix">
			<ul class="copy-links">
				<a href="agent_level.html"><li>网店代销</li></a>
				<a href="class_room.html"><li>U袋学堂</li></a>
				<a href="udai_about.html"><li>联系我们</li></a>
				<a href="temp_article/udai_article10.html"><li>企业简介</li></a>
				<a href="temp_article/udai_article5.html"><li>新手上路</li></a>
			</ul>
			<!-- 版权 -->
			<p class="copyright">
				© 2005-2017 XXX 版权所有，并保留所有权利<br>
				ICP备案证书号：闽ICP备XXX号-2&nbsp;&nbsp;&nbsp;&nbsp;福建省宁德市XXX&nbsp;&nbsp;&nbsp;&nbsp;Tel: XXX&nbsp;&nbsp;&nbsp;&nbsp;E-mail: XXX@qq.com
			</p>
		</div>
	</div>
</body>

<script  type="text/javascript">
			function cha(){
			$.ajax({
				xhrFields:{withCredentials: true},
					url: "http://localhost:16111/activity/chawei",
					mimeType: "post",
					dataType: "json",
					success: function(date){
					
						var str="";
						
						var wmk="";
						for (i in date) { 
							if(date[i].threshold==0){
								wmk="无门槛";
							}else {
								wmk="满"+date[i].preferentialway+"减"+date[i].parvalue+"元"
							}	
							var time=new Date(date[i].collectiontime);
							var time2=time.getFullYear()+"-"+(time.getMonth()+1)+"-"+time.getDay();
							var time3=new Date(date[i].timedata);
							var time4=time3.getFullYear()+"-"+(time3.getMonth()+1)+"-"+(time3.getDate());
							
							str+=	"<div class='coupon-list' style='float:left;margin-right:4.5px'>"+
							"<div class='coupon'>"+
							"<div class='coupon-hd' >"+
											"<b>"+"<small class='fz16'>¥"+"</small>"+date[i].parvalue.toFixed(2)+"</b>"+
											"<div class='fz12'>【使用期限】<br>"+time2
											+"至"+time4+"</div>"+
										"</div>"+
										"<div class='coupon-bd'>"+
											"<div class='fz12 c9'>券号："+date[i].id+"</div>"+
											"<div class='fz12 c9'>规则：" +wmk+"</div>"+
										"</div>"+
										"<a href='#' onclick='ling("+date[i].id+")' class='coupon-ft'>立即领取</a>"+
										"</div>"+
										"</div>";
			
									
						}
					if(str==""){
						str=
								"<div class='coupon-list' style='margin-left:250px'>"+
														"<div class='empty-msg'>哇，居然没有优惠券了？</div>"+
													"</div>";
					}
					document.getElementById("xp").innerHTML=str;
						
						// alert(document.getElementById("kan").innerHTML)
						
					},
				});
			}
			cha();
			function ling (x) {

				$.ajax({
					xhrFields:{withCredentials: true},
					url:"http://localhost:16111/activityservice/yhjxiu",
					Type:"post",
					data:{
						id:sessionStorage.getItem("userid"),
						juan:x
					},
					success:function() {
						
						location.reload();
					}
				})
		
			}
		
			
</script>
</html>